<template>
  <div class="debounce">
    <el-button type="primary" @click="handleTest">测试</el-button>
    <el-button type="primary" @click="handleTest1">测试1</el-button>
  </div>
</template>

<script>
import { debounce } from '@/utils/tools'
export default {
  name: 'debounce',
  methods: {
    handleTest1 () {
      console.log('11111')
    },
    handleTest: debounce(function () {
      console.log(Date.now() + '=====')
    }, 1000)
  }
}
</script>

<style scoped>

</style>
